package com.kpf.springcloud.controller;

import com.kpf.springcloud.common.ResultJson;
import com.kpf.springcloud.service.FeignClientUserServer;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shiwen
 * @date 2021/4/8
 */
@RestController
@Api(value = "点赞相关接口", description = "点赞相关接口") //swagger接口配置
public class FollowUserConsumerController {

    @Autowired
    private FeignClientUserServer feignClientUserServer;

    /**
     * 点赞帖子 - 需要登陆
     *
     * @param userId
     * @return
     */
    @PostMapping("/consumer/follow/followUser")
    public ResultJson followUser(@RequestParam(value = "userId") int userId) {
        return feignClientUserServer.followUser(userId);
    }

    @GetMapping("/consumer/follow/getFollowInfo")
    public ResultJson getFollowInfo() {
        return feignClientUserServer.getFollowInfo();
    }

    @GetMapping("/consumer/follow/getFollowUserList")
    public ResultJson getFollowUserList() {
        return feignClientUserServer.getFollowUserList();
    }

    @GetMapping("/consumer/follow/getFansList")
    public ResultJson getFansList() {
        return feignClientUserServer.getFansList();
    }

    //@GetMapping("/consumer/follow/getFansAndStatus")
    //public ResultJson getFansAndStatus(@RequestParam(value = "followUserId") int followUserId) {
    //    return feignClientUserServer.getFansAndStatus(followUserId);
    //}

}